package com.hnevc.caoliuye;

/**
 * 多线程
 * 继承 Thread类
 * Rnnable接口
 */
public class Example {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        Thread thread = new Thread();
        thread.start();
        while (true){
            System.out.println("死循环！！");
        }
    }
}
class MyThread implements Runnable{

    @Override
    public void run() {
        while (true){
            System.out.println("Runnable方法线程开启！！！");
        }
    }
}